package cn.starrysky108.simpleerp.core.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author Carl Lee
 */
public enum SystemPermissionTypeEnum {
    /**
     * 1-->目录
     */
    DIR(1, "目录"),
    /**
     * 2-->菜单
     */
    MENU(2, "菜单"),
    /**
     * 3-->按钮
     */
    BUTTON(3, "按钮"),

    /**
     * 4-->其他
     */
    OTHERS(4, "其他");

    /**
     * 枚举代码
     */
    @EnumValue
    private final int code;
    /**
     * 序列化返回值
     */
    @JsonValue
    private final String description;

    SystemPermissionTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "SystemPermissionTypeEnum{" +
                "code=" + code +
                ", description='" + description + '\'' +
                '}';
    }
}
